<script>
	window.config = {
		title: (nw.App.manifest.title ? nw.App.manifest.title : '无标题') + ' v' + nw.App.manifest.version,
		page: "page/home.html",
	};
</script>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="resources/css/base.css">
	<link rel="stylesheet" href="resources/css/index.css">
</head>
<body id="body">
	<!--<div class="window-title-bar">-->
		<!--<span class="title">-->
			<!--<img src="" id="icon" style="max-width:15px;max-height:15px;vertical-align: middle;"><span id="title"></span>-->
		<!--</span><span class="system-button">-->
			<!--<i class="min" onclick="nw.Window.get().minimize()"><span class="ico-min"></span></i>-->
			<!--<i class="max" id="sys_maximize_button" current=""><span class="ico-max" restore-class="ico-restore" max-class="ico-max"></span></i>-->
			<!--<i class="close" onclick="nw.App.quit()"><span class="ico-close"></span></i>-->
		<!--</span>-->
	<!--</div>-->
	<iframe id="window" class="window-content" ></iframe>
	<script>
		// nw.Window.get().on('maximize', function() {
		// 	let maximizeButton = document.getElementById('sys_maximize_button');
		// 	maximizeButton.setAttribute('current', 'max');
		// 	let img = maximizeButton.querySelector('span');
		// 	img.className = img.getAttribute('restore-class');
		// });
		//
		// nw.Window.get().on('restore', function() {
		// 	let maximizeButton = document.getElementById('sys_maximize_button');
		// 	maximizeButton.setAttribute('current', '');
		// 	let img = maximizeButton.querySelector('span');
		// 	img.className = img.getAttribute('max-class');
		// });
		//
		// document.getElementById('sys_maximize_button').addEventListener('click', function() {
		// 	if(this.getAttribute('current') == 'max') {
		// 		nw.Window.get().restore();
		// 	} else {
		// 		nw.Window.get().maximize();
		// 	}
		// });
		//
		// document.getElementById('title').innerHTML = config.title;
		document.getElementById('window').src = config.page;
		// // window.onload = function() {
		// // 	nw.Window.get().show();
		// // };
		//
		window.ContentWindow = document.getElementById('window').contentWindow;
		//
		// try {
		// 	if(nw.App.manifest.window.icon) {
		// 		let icon = document.getElementById('icon');
		// 		icon.src = nw.App.manifest.window.icon;
		// 		icon.style.marginRight = '5px';
		// 	}
		// } catch (e) {
		//
		// }
		
	</script>
</body>
</html>